package com.example.demo.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import springfox.documentation.annotations.ApiIgnore;

@ApiIgnore
@Controller
@RequestMapping("/tokenFailer")
public class TokenFailerController {

	@ResponseBody
	@RequestMapping("/tokenError")
	public Object tokenError(HttpServletRequest request){
		Map<String,Object> result = new HashMap<String, Object>();
		result.put("code", 1);
		result.put("message", request.getAttribute("errorMsg"));
		return result;
	}
}
